module sw.cgiinfo;
import nazo.appinfo, sw.locale.locale, std.string, sw.main, nazo.http;
///Cgiに関する情報
class CgiInfo:AppInfo{
  ///名前
  override string name(){return "Structure Wiki";};
  ///バージョン
  override string stableVersion(){return "0.0.4.3";}
  ///ホームページ
  override string homepage(){return "http://www4.pf-x.net/~nazodane/";}
  ///テストバージョンかどうか
  override bool isTesting(){return true;}
  ///ライセンス
  override string license(){return "GPL";}
  ///作成者
  override string creator(){return "Nazo(謎)";}
  ///貢献者
  override string contributor(){return "";}
  ///このcgiについてをhtmlで返す
  string about(){
    enum s = "<a href=\""~Http.relPath~"?mode=global:info\">"~this.name~" "~this.ver~"</a>";
    return "<p id=\"about\">"~CGI.locale.getValue!(Locale.About.generated)().replace("%s",s)~"</p>";
  }
  private string enableOptionsInternal(){
    string[] options;
    version(Wiki) options ~= "Wiki";
    version(Upload) options ~= "Upload";
    version(BugTracking) options ~= "BugTracking";
    version(Synchronize) options ~= "Synchronize";
    return options.join(", ");
  }
  override string enableOptions(){
    enum options = enableOptionsInternal();
    return options;
  }
}
